CREATE TABLE [dbo].[TTSTOC_CHEQ]
(
[CO_EMPR] [dbo].[TD_VC_002] NOT NULL,
[CO_BANC] [dbo].[TD_VC_003] NOT NULL,
[NU_CNTA_BANC] [dbo].[TD_VC_020] NOT NULL,
[NU_SECU] [dbo].[TD_IN_001] NOT NULL CONSTRAINT [DF__TTSTOC_CH__NU_SE__10D65D75] DEFAULT ((0)),
[NU_CHEQ_INIC] [dbo].[TD_VC_020] NOT NULL,
[NU_CHEQ_FINA] [dbo].[TD_VC_020] NOT NULL,
[FE_RECE] [dbo].[TD_DT_001] NULL,
[SI_CHEQ_ACTU] [dbo].[TD_VC_001_SINO] NOT NULL CONSTRAINT [DF__TTSTOC_CH__SI_CH__11CA81AE] DEFAULT ('N'),
[NU_ULTI_CHEQ] [dbo].[TD_VC_020] NULL,
[TI_SITU] [dbo].[TD_VC_003] NOT NULL,
[FE_ULTI_CHEQ] [dbo].[TD_DT_001] NULL,
[CO_UNID_CONC] [dbo].[TD_VC_003] NULL,
[CO_USUA_CREA] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTSTOC_CH__CO_US__13B2CA20] DEFAULT (suser_sname()),
[FE_USUA_CREA] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTSTOC_CH__FE_US__14A6EE59] DEFAULT (getdate()),
[CO_USUA_MODI] [dbo].[TD_VC_008_USUA] NULL CONSTRAINT [DF__TTSTOC_CH__CO_US__159B1292] DEFAULT (suser_sname()),
[FE_USUA_MODI] [dbo].[TD_DT_001_SIST] NULL CONSTRAINT [DF__TTSTOC_CH__FE_US__168F36CB] DEFAULT (getdate())
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTSTOC_CHEQ] WITH NOCHECK ADD CONSTRAINT [CK__TTSTOC_CH__SI_CH__12BEA5E7] CHECK NOT FOR REPLICATION (([SI_CHEQ_ACTU]='N' OR [SI_CHEQ_ACTU]='S'))
GO
ALTER TABLE [dbo].[TTSTOC_CHEQ] ADD CONSTRAINT [PK__TTSTOC_C__33B4505C078CEA5D] PRIMARY KEY CLUSTERED  ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC], [NU_SECU]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TTSTOC_CHEQ] ADD CONSTRAINT [FK__TTSTOC_CHEQ__6E221E15] FOREIGN KEY ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC]) REFERENCES [dbo].[TMCNTA_BANC] ([CO_EMPR], [CO_BANC], [NU_CNTA_BANC])
GO
